package set15

import . "tfts"

//func Jhin2() *Fight {
//	c := Hero("Jhin2")
//	c.LockAs = true
//	c.PrevCall(func(fight *Fight) {
//		speed := fight.RawAs()*100 - 100
//		fight.Add(AD(int(speed * 0.8)))
//		TraceLog("%4.1f秒:转化%d攻击力\n", fight.Current(), int(speed*0.8))
//	})
//	return c
//}
//
//func Jhin3() *Fight {
//	c := Hero("Jhin3")
//	c.LockAs = true
//	c.PrevCall(func(fight *Fight) {
//		speed := fight.RawAs()*100 - 100
//		fight.Add(AD(int(speed * 0.8)))
//		TraceLog("%4.1f秒:转化%d攻击力\n", fight.Current(), int(speed*0.8))
//	})
//	NewAction(c).Repeat(4).On(AttackE)
//	return c
//}

func LeeSinD() *Fight {
	c := Hero("LeeSinD")
	c.Add(AE(60))
	return c
}

func LeeSinE() *Fight {
	c := Hero("LeeSinE")
	a := NewAction(c).Once(4).On(BeforeCastE)
	a.AdDmg = "270*4"
	a.TraceAction("LeeSin")
	return c
}

func Varus() *Fight {
	c := Hero("Varus")
	NewAction(c).RepeatCallStack(2, 7).On(TimeGoE).RestoreMana("Varus", 8)
	c.EndTime = 20
	return c
}

func Yone() *Fight {
	c := Hero("Yone")
	c.Add(AE(int(45 * 1.8)))
	a := NewAction(c).Repeat(1).On(AttackE)
	a.ApDmg = "135"
	a.TraceAction("RightSword")
	b := NewAction(c, AS(5)).Stack(1).On(AttackE)
	b.TraceAction("Yone")
	return c
}

func Yone0() *Fight {
	c := Hero("Yone")
	tmp := 45 * 1.8 / 2
	c.Add(AE(int(tmp)))
	a := NewAction(c).Repeat(1).On(AttackE)
	a.ApDmg = "135/2"
	a.TraceAction("RightSword")
	b := NewAction(c, AS(5)).Stack(1).On(AttackE)
	b.TraceAction("Yone")
	return c
}

func Twist() *Fight {
	c := Hero("Twist")
	c.Add(AtkAmp(153))
	c.Add(AE(101))
	return c
}

func Twist0() *Fight {
	c := Hero("Twist0")
	c.Add(AtkAmp(153))
	tmp := 101 / 1.35
	c.Add(AE(int(tmp)))
	return c
}

func Braum() *Fight {
	c := Hero("Braum")
	return c
}

func Gwen() *Fight {
	c := Hero("Gwen")
	c.Add(AE(45))
	return c
}

func Volibear() *Fight {
	c := Hero("Volibear")
	//a := NewAction(c).Repeat(4).On(AttackE)
	//a.AdDmg = "135"
	//a.TraceTrigger("Around")
	c.Add(AtkAmp(30))
	b := NewAction(c).RepeatCallStack(3, 5).On(TimeGoE)
	b.AdDmg = "135*1.5*1.5"
	b.TraceAction("Slam")
	return c
}

func Jinx() *Fight {
	c := Hero("Jinx")

	a := NewAction(c, AS(9)).Stack(1, 7).On(AttackE)
	a.TraceAction("Jinx")
	return c
}

// 清空破防暴击
func Ashe() *Fight {
	c := Hero("Ashe")
	c.Add(Critable())
	NewAction(c).Repeat(1).On(BeforeCastE).
		AddCall("Ashe", func(fight *Fight) {
			amp := (0.25*8 - 1) * 100
			stack := int((fight.RawAs()*100 - 100) / 50)
			plus := 88 * float64(stack)
			call := AddBuff("Arrows", 8, AttackE, AtkAmp(int(amp)), AE(int(plus)), CritRate(-45))
			call(fight)
			TraceLog("%4.1f秒:[Arrow]%d层, 特效伤害%.0f\n", fight.Current(), stack, plus*fight.AP())
		})
	return c
}

func Ashe0() *Fight {
	c := Hero("Ashe")
	NewAction(c).Repeat(1).On(BeforeCastE).
		AddCall("Ashe", func(fight *Fight) {
			amp := (0.25*8 - 1) * 100
			stack := int((fight.RawAs()*100 - 100) / 50)
			plus := 64 * float64(stack) / fight.AP()
			call := AddBuff("Arrows", 8, AttackE, AtkAmp(int(amp)), AE(int(plus)))
			call(fight)
			TraceLog("%4.1f秒:[Arrow]%d层, 特效伤害%.0f\n", fight.Current(), stack, plus*fight.AP())
		})
	return c
}

func Viego2() *Fight {
	c := Hero("Viego2")
	c.Add(AE(45))
	return c
}

func Viego3() *Fight {
	c := Hero("Viego3")
	c.Add(AE(75))
	return c
}

func KogMaw2() *Fight {
	c := Hero("KogMaw2")
	c.Add(AE(40))
	c.Add(AP(15))
	NewAction(c, AS(15)).Stack(1).On(BeforeCastE)
	return c
}

func KogMaw3() *Fight {
	c := Hero("KogMaw3")
	c.Add(AE(65))
	c.Add(AP(30))
	NewAction(c, AS(17)).Stack(1).On(BeforeCastE)
	return c
}

func Smolder3() *Fight {
	c := Hero("Smolder3")
	c.Add(AD(30))
	return c
}

func Ziggs2() *Fight {
	c := Hero("Ziggs3")
	c.Add(AE(63))
	return c
}

func Ziggs3() *Fight {
	c := Hero("Ziggs3")
	c.Add(AE(100))
	return c
}
